#ifndef _CONTAINER_OF_H_
#define _CONTAINER_OF_H_

#define container_of CONTAINER_OF
#define offsetof 	 OFFSETOF

#define OFFSETOF(TYPE,MEMBER)((size_t)&((TYPE *)0)->MEMBER)

#define CONTAINER_OF(ptr,type,member)({ \
                                const typeof( ((type *)0)->member) *__mptr = (ptr); \
                                (type *)( (char *)__mptr - OFFSETOF(type,member));})

#define OBJPOLL_CREATE(type,n)({\
								const typeof( ((type *)0))

#endif


#define _mem_free(type,ptr)({\
			const typeof( ((type *)0)->start) *__mptr = (ptr);\
			free(ptr);})

#define mem_free(ptr) do {\
				_mem_free((struct chunk), ptr) ; \
			}while(0);



